package com.itheima.mapper;

import com.itheima.pojo.Food;
import com.itheima.pojo.Foodattribute;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;

import java.util.List;

/**
 * @author 林晓伟
 */
@Mapper
public interface FoodMapper {

    //H13-菜品新增

    @ResultMap("FoodMapper")
    Integer add(Food food);
    @ResultMap("FoodMapper")
    void adds(Foodattribute foodattribute);

//    H12-菜品分页查询

    @ResultMap("FoodMapper")
    List<Food> all(String name);

    //H12-菜品下拉列表

    @ResultMap("FoodMapper")
    List<Food> list(String categoryId);

    @ResultMap("FoodMapper")
    Food foodAll(Integer id);

    //    H12-根据ID查询菜品

    @ResultMap("FoodMapper")
    List<Foodattribute> foodSll(String dishId);
    @ResultMap("FoodMapper")
    Food a(Integer id);


    //H14-菜品修改

    @ResultMap("FoodMapper")
    Integer dal(String s);
    @ResultMap("FoodMapper")
    Integer update(Food food);
    @ResultMap("FoodMapper")
    Integer updates(Foodattribute foodattribute);
    @ResultMap("FoodMapper")
    Integer deleter(String s);
    @ResultMap("FoodMapper")
    Integer adsss(Foodattribute foodattribute);

//    H15-批量删除菜品

    @ResultMap("FoodMapper")
    Integer delete(Integer ids);
    @ResultMap("FoodMapper")
    Integer deletes(String dishId);

//    F16-菜品停售/起售

    @ResultMap("FoodMapper")
    Integer statusUpdate(Integer ids);
    @ResultMap("FoodMapper")
    Integer staUpdate(Integer ids);
    @ResultMap("FoodMapper")
    Integer sUpdate(Integer ids);

    @ResultMap("FoodMapper")
    String j(Integer id);























}
